{% extends 'base.html' %}

{% block title %}
 - 首页
{% endblock %}

{% block content %}
<table class="table table-striped">
  <thead>
    <tr>
      <th scope="col">id</th>
      <th scope="col">图书名称</th>
      <th scope="col">作者</th>
    </tr>
  </thead>
  <tbody>
    {% for row in rows %}
        <tr>
          <th scope="row">{{ forloop.counter }}</th>
          <td><a href="{% url 'detail' book_id=row.0 %}" data-id="{{ row.0 }}" class="btn btn-primary">{{ row.1 }}</a></td>
          <td>{{ row.2 }}</td>
        </tr>
    {% endfor %}
  </tbody>
</table>
{% endblock %}